<?php
require __DIR__ . '/../bootstrap.php';

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
//use Entity\Sim;
//$em = require __DIR__.'/../example/em.php';
//$sim = new Sim;
//$sim = $em->getRepository('Entity\Sim')->findOneByNumber("37282705029");
//if ($sim){
//    $em->remove($sim);
//    $em->flush();
//}
//$result=true;
//if ($result==true){
//    
//}else{
//    echo '{ "message": "Ошибка! Номер ' . $_POST['del_sim'] . ' не удален!" }';
//}
$em = require __DIR__.'/../example/em.php';
use Service\SimManager;
$id = $_POST['del_sim'];
$manager = new SimManager($em);
//echo $id;
//jbdump($manager, 0, 'myLoveVariable');
$manager->delete($id);
//echo '{ "message": "Номер удален!", "type": "st-success" }';



?>
